import 'package:flutter/material.dart';

class VipPayment with ChangeNotifier {
  // 选择的支付类型 使用微信还是用支付宝
  int paymentType = 1;
  // 当前选择的是vip选项类别 比如是小学 初中 或者是高中的vip
  int vipType = 0;
  // 当前选择的vip类型选项卡的id
  int vipId;
  // 当前真实价钱
  double original_price = 0;
  // 当前优惠后的价钱
  double discount_price = 0;

  currenOptions(data) {
    vipId = data['id'];
    original_price = double.parse(data['original_price'].toString());
    discount_price = double.parse(data['discount_price'].toString());
    notifyListeners();
  }

  setpayment(type) {
    paymentType = type;
    notifyListeners();
  }

  setVipId(id) {
    vipId = id;
    notifyListeners();
  }

  setVipType(type) {
    vipType = type;
    notifyListeners();
  }
}
